home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
S3ENV10.ARJ
/
ENVED10.DOC
< prev
next >
Wrap
Text File
|
1992-07-08
|
7KB
|
158 lines
Program: Environment Editor
Version: 1.0
Date: 07/08/92
Author: George Spafford
Purpose:
To edit the master environment table, save tables to files and to load
tables from files.
Background:
The DOS environment table contains variables that contain information for
DOS and for programs. For example, PATH, PROMPT, COMPSEC and TEMP are all
DOS variable names. Compilers frequently store the path names for their
libraries and include files in an environment variable. With all of the
uses of the environment, it is easy to run out of space in it.
The size of the environment table, by default, is usually fairly small (128
or 256 bytes). It can be increased by use of the SHELL statement in the
CONFIG.SYS in DOS versions 3.1 and above. Version 3.1 is a little different
from other versions of DOS in that the number of 16-byte paragraphs are
specified rather than the number of bytes of environment space. For DOS 3.1,
the following command is used:
SHELL=C:\DOS\COMMAND.COM /E:64 /P
This gives you 64 paragraphs that are 16 bytes each, or 1024 bytes total. The
/P switch makes it the permanent shell. For versions newer than 3.1, the
actual number of bytes are specified. For example:
SHELL=C:\DOS\COMMAND.COM /E:1024 /P
It sets aside 1024 bytes for the environment and again makes this shell the
permanent one. At any rate, you only have so much space & you may need
to add, delete or change variables at any given time.
ENV.BAT:
Take a moment to look at the ENV.BAT file.
@echo off
set expand1=001122334455667788990011223344556677889900112233445566778899
set expand2=001122334455667788990011223344556677889900112233445566778899
enved
The first line just turns off the DOS command echo - in other words, you will
not see anything that runs afterwards. The important lines are the 2nd and 3rd.
You see, when a program runs, such as ENVED.EXE, it gets a copy of the parent
environment and gets only a small portion, if any, of free environment space.
By loading up EXPAND1 and EXPAND2 with dummy bytes, that space can be retrieved
by ENVED. Those two variables do not have to exist, but if you plan on adding
a lot of variables to the table, you need either one or both of these lines.
You can also vary the length of the lines to set aside however much space that
you want to.
ENVED.EXE
Remember, if you want to add variables, make sure that you run the editor
via the ENV.BAT file (or whatever you want to name the .BAT file) so the
dummy EXPAND1 and/or EXPAND2 entries can be used.
Making Changes:
ENVED reads in the environment table and displays it in a menu. If you want
to change a variable, highlight it and press enter. An editor will appear with
the variable as it appears now.
Using the Editor:
1. DO NOT TYPE "SET"!!! Not before the variable name and definitely
NOT by itself.
2. Always put an equal sign between your variable name and value.
For example: DSZ=C:\PROTOCOLS
3. The editor shows three lines on the screen, but it is really just
one long string wrapped around. Do not try to use the up and down
arrows. <HOME> can take you to the start of the line, <END> will
jump to the end, and the arrow keys can move you around.
4. Press <ENTER> when finished.
Inserting New Variables:
If you want to add a new entry, press <INS> from the main menu. Use the editor
to type in your new value. Adhere to the rules set above.
Deleting Variables:
Highlight the variable that you would like to delete and press <DEL>.
Saving Files:
If you want to save a table for future use, press F1 and then F2 to save the
file. Enter up to 8 letters to create a VALID DOS file name (no spaces).
The program will assign an extension of .ENV so do not try to assign one
yourself.
Loading Files:
If you want to use a previously saved configuration, press F1 and then F1
again. Select the file that you want to use from the menu. Note, when
you load a file, all existing environment entries will be deleted. The
file that you are loading becomes essentially the new environment table entry.
Exiting ENVED:
When you exit the program, if you want to save the changes, press <ENTER>. If
you do not want to save the changes, press <ESC>.
How does it do it?
To get around the problem of only modifying the child environment and not the
parent environment, a batch file called ##ENV##.BAT is created. A special
routine stuffs that name into the keyboard buffer and a fake enter. When
ENVED has actually terminated, the batch file is executed and all of the
updates are made. ENVED does not delete this file so you can see it and
keep it if you want to quickly access the changes.
Registration:
If you find this program to be useful, please register it within
30 days of its initial use. If you continue to use it after this
period of time, you are violating your license to use it. Only
by registering the program can you legally continue to use it.
And only by registering your copy can I continue to develop shareware
programs such as this.
The Environment Editor is priced at $10 per concurrently used copy. Site
licenses are available based on the number of machines that will use it on
the site concurrently.
Please send payments in American funds to (please no cash):
George Spafford
3001 Lakeshore Drive #329
St. Joseph, MI 49085
Queued Access BBS 19200-8-N-1 ANSI (616) 468-5026
Sysop: Tim Akright NEC/NC
If you have any comments or suggestions, I'd really like to hear them
too. I try to respond to all of my mail.
SHAREWARE DISTRIBUTORS:
You may distribute this program as long as it is made clear that you are
only a distributor and that the program is not registered until they make
payment to me. Please do not charge more than $5 per disk to distribute
ENVED to your customers (unless of course ENVED is on a CDROM with 100's of
other programs).
::::: Legal :::::
ENVED IS DISTRIBUTED AS IS. THE AUTHOR (GEORGE SPAFFORD) MAKES
NO WARRANTIES OF APPROPRIATENESS, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. THE AUTHOR ASSUMES NO LIABILITY FOR ANY DAMAGES
(INCLUDING LOST PROFITS, WAGES OR ANY OTHER CONSEQUENTIAL OR INCIDENTAL
DAMAGES) ARISING OUT OF THE MISUSE OR INABILITY TO USE THIS PRODUCT PACKAGE.